﻿using System;
using System.Drawing;

namespace OrionApplication.OrionForm.Dialog
{
    public partial class OrionErreur : ComponentFactory.Krypton.Toolkit.KryptonForm
    {
        public OrionErreur()
        {
            InitializeComponent();
        }

        public void Show(string Titre, string Body)
        {
            this.Text = Titre;
            this.lblBody.Text = Body;
            if (this.lblBody.Size.Width + 72 > this.Size.Width - 10)
                this.Size = new Size(this.lblBody.Size.Width + 100, this.Size.Height);
            if (this.lblBody.Size.Height > 30)
                this.Size = new Size(this.Size.Width, this.Size.Height + this.lblBody.Size.Height);

            this.ShowDialog();
        }

        private void btnOui_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
